#include <iostream>
#include <string>
using namespace std;

bool isPalindrome(int x) {
  if (x < 0)
    return false;
  string s = to_string(x);
  int n = s.size();
  for (int i = 0; i < n / 2; ++i) {
    if (s[i] != s[n - i - 1])
      return false;
  }
  return true;
}

int main() {
  int x;
  cin >> x;
  cout << (isPalindrome(x) ? "Palindromic Number" : "Non-Palindromic Number")
       << endl;
  return 0;
}
